package org.zn.mvcbase.rest.naming;

import java.util.Collection;
import java.util.Map;

import org.zn.commons.collection.MapType;
import org.zn.commons.collection.Maps;

public class ResourcesNaming implements Naming, java.io.Serializable{
	
	private static final long serialVersionUID = 1L;

	private Map<String,ResourcesNaming> children=Maps.newMap(MapType.ConcurrentMap);
	private String name ;
	private String value;
	private String method;
	private boolean accessible=true;
	
	
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	
	public boolean isAccessible() {
		return accessible;
	}
	public void setAccessible(boolean accessible) {
		this.accessible = accessible;
	}

	public String getMethod() {
		return method;
	}
	public void setMethod(String method) {
		this.method = method;
	}
	public String getValue() {
		return value;
	}
	public void setValue(String value) {
		this.value = value;
	}
	
	@Override
	public Collection<ResourcesNaming> getNamingList() {
		// TODO Auto-generated method stub
		return children.values();
	}


	@Override
	public void put(Naming naming) {
		
		children.put(naming.getName(), (ResourcesNaming)naming);
			
	}

	@Override
	public Naming get(String name) {
		// TODO Auto-generated method stub
		return children.get(name);
	}

	@Override
	public void remove(String name) {
		children.remove(name);
	}

	
}
